// 分类相关请求
import service from "./index";

const prefix = "/assort";

/**
 * 查询所有分类
 */
export function list() {
  return service({
    url: `${prefix}/list`,
    method: "GET",
  });
}

/**
 * 新增分类信息
 */
export function addAssort(assort) {
  return service({
    url: `${prefix}/addAssort`,
    method: "POST",
    data: assort,
  });
}

/**
 * 根据分类id删除分类信息
 */
export function deleteById(id) {
  return service({
    url: `${prefix}/deleteById/${id}`,
    method: "DELETE",
  });
}
